//var arr = new Array();
var count = arr.length;
  setInterval(function () {
    for(var i=0;i<count;i++){
    var temp = arr[i].split(",");
    var starttime = new Date(temp[0],parseInt(temp[1])-1,temp[2],temp[3],temp[4],temp[5]);
    var nowtime = new Date();
    var time = starttime - nowtime;
    //new
    var date3 = starttime.getTime() - nowtime.getTime();
    var days=Math.floor(date3/(24*3600*1000));
    //计算出小时数
    var leave1=date3%(24*3600*1000);   //计算天数后剩余的毫秒数
    var hours=Math.floor(leave1/(3600*1000));
    // //计算相差分钟数
    var leave2=leave1%(3600*1000);    //计算小时数后剩余的毫秒数
    var minutes=Math.floor(leave2/(60*1000));
    // //计算相差秒数
    var leave3=leave2%(60*1000);    //计算分钟数后剩余的毫秒数
    var seconds=Math.round(leave3/1000);
        days   = days>9?days:'0'+days;
        hours   = hours>9?hours:'0'+hours;
        minutes = minutes>9?minutes:'0'+minutes;
        seconds = seconds>9?seconds:'0'+seconds;
    // console.log(" 相差 "+days+"天 "+hours+"小时 "+minutes+" 分钟"+seconds+" 秒");

    // var day = parseInt(time / 1000 / 60 / 60 / 24);
    // var hour = parseInt(time / 1000 / 60 / 60 % 24);
    // hour = hour>9?hour:'0'+hour;
    // var minute = parseInt(time / 1000 / 60 % 60);
    // minute = minute>9?minute:'0'+minute;
    // var seconds = parseInt(time / 1000 % 60);
    // seconds = seconds>9?seconds:'0'+seconds;
    var index = i+1;
    $('.timespan'+index).html(days+"天 "+hours+": "+minutes+" :"+seconds);
    // $('.timespan'+index).html(hour + " : " + minute + " : " + seconds );
    }
  }, 1000);

var w = $('.top-tab ul li').outerWidth(true);
var l = $('.top-tab ul li').length;
$('.top-tab ul').width(w*l);

$('.top-tab ul li').click(function() {
    $(this).addClass('top-tab-active').siblings().removeClass('top-tab-active');
    $('.top-tab-icon').removeClass('top-tab-icon-active');
    $('.top-tab-icon').eq($(this).index()).addClass('top-tab-icon-active');
    $('.f-muii-content').eq($(this).index()).show().siblings().hide();
});